﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="InvokeMethodExpression.cs" company="JDML Consulting Ltd.">
//   Copyright 2011 Photon Project - http://photon.codeplex.com
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Photon.Windows.Input
{
    using System.Collections.Generic;
    using System.Collections.ObjectModel;
    using System.Linq;
    using Collections;

    internal class InvokeMethodExpression
    {
        public InvokeMethodExpression(string methodName, IEnumerable<InvokeMethodTypeReference> parameters)
        {
            MethodName = methodName;
            ParameterTypes = new ReadOnlyCollection<InvokeMethodTypeReference>(
                parameters != null ? parameters.ToArray() : EmptyArray<InvokeMethodTypeReference>.Instance);
        }

        public string MethodName { get; private set; }

        public ReadOnlyCollection<InvokeMethodTypeReference> ParameterTypes { get; private set; }
    }
}